#include <stdio.h>
#include <PulseAudioUtils.h>

int	main(int argc, char **argv) {
    
    pa_sample_spec ss;
    pa_simple *s;

    createPulseSampleSpecification(&ss, PA_SAMPLE_S16LE, 44100, 2);

    if (createPulseSimpleRecord(&s, &ss)) {
        while (1)
        {
            char buffer[100];
            if (readPulseSimple(s, buffer, sizeof(buffer))) {
                
            } else {
                goto fail;
            }
        }
    }

fail:
    if (s != NULL) {
        destroyPulseSimple(&s);
    }

    return 0;
}